package com.woniuxy.caradmin.service.impl;


import com.woniuxy.caradmin.entity.pojo.Breakrulerecord;



import com.woniuxy.caradmin.entity.vo.BreakrulerecordVo;
import com.woniuxy.caradmin.mapper.BreakrulerecordMapper;
import com.woniuxy.caradmin.service.BreakrulerecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author womenzu
 * @since 2020-12-07
 */
@Service
public class BreakrulerecordServiceImpl  implements BreakrulerecordService {
    @Autowired
    private BreakrulerecordMapper breakrulerecordMapper;
    @Override
    public List<Breakrulerecord> selectAll(BreakrulerecordVo breakrulerecordVo) {
        return breakrulerecordMapper.selectAll();
    }

    @Override
    public int addBreakrulerecord(Breakrulerecord breakrulerecord) {
        return breakrulerecordMapper.addBreakrulerecord(breakrulerecord);
    }

    @Override
    public int updateBreakrulerecord(Breakrulerecord breakrulerecord) {
        return breakrulerecordMapper.updateBreakrulerecord(breakrulerecord);
    }

    @Override
    public boolean removeB(Integer[] ids) {
        if (ids != null && ids.length > 0 ){
            for (Integer id :ids){
                breakrulerecordMapper.removeB(id);
            }
          return true;
        }
        return false;
    }

    @Override
    public List<Breakrulerecord> selectAllBy(BreakrulerecordVo breakrulerecordVo) {

        return breakrulerecordMapper.selectAllBy(breakrulerecordVo);
    }

    @Override
    public Breakrulerecord selectBreakById(Integer id) {
        return breakrulerecordMapper.selectBreakById(id);
    }
}
